package com.qianfeng.smartdevice.service;

import com.github.pagehelper.PageInfo;
import com.qianfeng.smartdevice.dto.UserDto;
import com.qianfeng.smartdevice.pojo.SysUserInfo;

/**
 * Created by wenka on 2022/3/14 16:46
 *
 * @author Jackiechan
 * @version 1.0
 * @since 1.0
 */
public interface SysUserService {
    /**
     * 根据用户id查询
     *
     * @param userId
     * @return
     */
    SysUserInfo findById(Long userId);

    /**
     * 查询所有用户信息
     *
     * @return
     */
    PageInfo<SysUserInfo> findAll(int pageSize, int pageNum);

    /**
     * 添加新的用户
     *
     * @param sysUserInfo
     */
    void addUser(SysUserInfo sysUserInfo);
    /**
     * 根据用户名密码查询
     * @param username 用户名
     * @param password 密码
     * @return
     */
    SysUserInfo findByUserNameAndPassword(String username,String password);

    /**
     * 登录
     * @param userDto
     * @return
     */
    SysUserInfo login(UserDto userDto);
}
